package com.zxcrm.zxcrm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zxcrm.common.annotation.Excel;
import com.zxcrm.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商机产品关系表对象 zxcrm_bussiness_product
 * 
 * @author xu
 * @date 2025-07-09
 */
@Data
public class ZxcrmBussinessProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 商机id */
    @Excel(name = "商机id")
    private Long bussinessOpportunityId;

    /** 产品id */
    @Excel(name = "产品id")
    private Long productId;

    /** 售价 */
    @Excel(name = "售价")
    private BigDecimal salePrice;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 合计 */
    @Excel(name = "合计")
    private BigDecimal totalPrice;

    /*产品信息*/
    private String name;

    private BigDecimal price;

    private String type;

    private String identifier;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public ZxcrmBussinessProduct() {
    }

    public ZxcrmBussinessProduct (Long id, Long bussinessOpportunityId, Long productId, BigDecimal salePrice, Long quantity, BigDecimal totalPrice){
        this.id = id;
        this.bussinessOpportunityId = bussinessOpportunityId;
        this.productId = productId;
        this.salePrice = salePrice;
        this.quantity = quantity;
        this.totalPrice = totalPrice;
    }

    public ZxcrmBussinessProduct (Long bussinessOpportunityId,Long productId,BigDecimal salePrice,Long quantity,BigDecimal totalPrice){
        this.bussinessOpportunityId = bussinessOpportunityId;
        this.productId = productId;
        this.salePrice = salePrice;
        this.quantity = quantity;
        this.totalPrice = totalPrice;
    }

}
